<template>
  <!-- 试卷简介 页面 -->
  <div class="test_intro_box">
    <!-- navbar -->
    <TestIntroTitleNavbar />
    <!-- 背景盒 -->
    <div class="test_bac_box">
      <div class="test_bac_left"></div>
      <div class="test_bac_right"></div>
      <!-- 扣子 -->
      <svg class="shj_icon" aria-hidden="true">
        <use xlink:href="#icon-icon_xinyong_xianxing_jijin-"></use>
      </svg>
    </div>
    <!-- 试卷信息 -->
    <div class="test_intro">
      <div class="info_box">
        <div class="info_title">2022年一级消防工程师富士达如果畅真题</div>
        <ul>
          <li>试卷类型: <span>历年真题</span></li>
          <li>上传时间: <span>2022-11-15 14:14:42</span></li>
          <li>所属项目: <span>初级会计师</span></li>
          <li>所属科目: <span>经济法基础</span></li>
          <li>试卷题量: <span>55道</span></li>
          <li>试卷总分: <span>100分</span></li>
          <li>答题时间: <span>75分钟</span></li>
        </ul>
      </div>
      <div class="intro_box">
        <div class="intro_title">题型介绍</div>
        <span>2022年一级消防工程师富士达如果畅真题</span>
      </div>
    </div>
    <!-- 开始答题 -->
    <div class="bottom_box">
      <div class="title" @click="handleAnswer">开始答题</div>
    </div>
  </div>
</template>

<script>
import { useRoute, useRouter } from "vue-router";
import TestIntroTitleNavbar from "./component/TestIntroTitleNavbar.vue";
export default {
  components: { TestIntroTitleNavbar },
  setup() {
    const route = useRoute();
    const router = useRouter();
    // 去答题页面
    const handleAnswer = () => {
      router.push(`/answerPage/${route.params.id}`);
    };
    return { handleAnswer };
  },
};
</script>

<style lang="less" scoped>
.shj_icon {
  width: 2.5rem;
  height: 2.5rem;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
  position: absolute;
  top: 0.5rem;
  left: 9.5rem;
  z-index: 999;
}
.test_intro_box {
  height: 100%;
  padding-top: 2.5rem;
  box-sizing: border-box;
  background-color: #fafafa;
}
.test_bac_box {
  position: relative;
  display: flex;
  justify-content: space-between;
  height: 10rem;
  width: 97%;
  border-radius: 0.5rem;
  margin: 0 auto;
  background-color: #d2be9f;
  overflow: hidden;
  .test_bac_left,
  .test_bac_right {
    width: 50%;
    height: 5rem;
    background-color: #fddeaf;
    clip-path: polygon(0 0, 100% 0, 100% 65%, 0% 100%);
    z-index: 99;
  }
  .test_bac_right {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 65%);
  }
}
.test_intro {
  position: fixed;
  top: 5rem;
  width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
  .info_box,
  .intro_box {
    border-radius: 0.3rem;
    padding: 1rem;
    box-sizing: border-box;
    background-color: #fff;
  }
  .info_box {
    padding-top: 3rem;
    .info_title {
      color: black;
      font-size: 1.05rem;
      font-weight: bold;
    }
    ul {
      margin-top: 0.8rem;
      li {
        color: black;
        font-size: 0.95rem;
        line-height: 1.8;
        span {
          color: #7c7c7c;
          margin: 0 0.5rem;
        }
      }
    }
  }
  .intro_box {
    margin: 1rem 0;
    .intro_title {
      color: black;
      font-size: 1.05rem;
      font-weight: bold;
      margin-bottom: 0.5rem;
    }
    span {
      color: #7c7c7c;
      font-size: 0.9rem;
    }
  }
}
.bottom_box {
  width: 100%;
  height: 3rem;
  background-color: #fff;
  position: fixed;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  .title {
    display: flex;
    align-items: center;
    height: 2.3rem;
    padding: 0rem 4rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    color: #fff;
    background-image: linear-gradient(to right, #f69f9f, red);
  }
}
</style>
